<script>
  import $ from '../dfish.js'
  import {h} from 'vue'
  import FormBase from './FormBase.vue'

  export default {
    name: 'w-checkboxgroup',
    mixins: [FormBase],
    props: ['pub', 'required', 'vertical', 'minSize', 'maxSize'],
    provide() {
      return {
        providePubParent: this
      }
    },
    data() {
      return {
        isGrid: false
      }
    },
    methods: {
      html_form() {
        return this.isGrid ? h('div', {class: 'w-boxgroup-grid'}, this.$slots) : this.$slots
      },
    },
    computed: {
      html_class() {
        return {'z-grid': this.isGrid, 'z-vertical': this.x.vertical}
      }
    }
  }
</script>
